package com.example.album;

import jakarta.persistence.*;

@Entity
@Table(name = "photo")
public class Img {
    @Id
    @Column(name = "photo_id", length = 16)
    private String photoId;

    @Column(name = "album_id", length = 16, nullable = false)
    private String albumId;

    @Column(name = "uploader_id", length = 16) // 去掉nullable = false
    private String uploaderId;


    @Column(name = "file_url", length = 255, nullable = false)
    private String fileUrl;

    @Column(name = "status")
    private Integer status;

    // getter/setter
    public String getPhotoId() { return photoId; }
    public void setPhotoId(String photoId) { this.photoId = photoId; }
    public String getAlbumId() { return albumId; }
    public void setAlbumId(String albumId) { this.albumId = albumId; }
    public String getUploaderId() { return uploaderId; }
    public void setUploaderId(String uploaderId) { this.uploaderId = uploaderId; }
    public String getFileUrl() { return fileUrl; }
    public void setFileUrl(String fileUrl) { this.fileUrl = fileUrl; }
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    public void setUploadId(String uploadId) { this.uploaderId = uploadId; }
}
